<?php
	require_once $_SERVER['DOCUMENT_ROOT'] . '/SAGER/logic/factory/CommandFactory.php';
	require_once $_SERVER['DOCUMENT_ROOT'] . '/SAGER/utilities/fpdf/fpdf.php';
	
	error_reporting (E_ALL ^ E_NOTICE);
	
	$debug = $_SESSION['debug'];
	
	class PresenterPayExhele {
		/**
		 * Constructor of the presenter
		 */
		public function __construct() {}
		
		/**
		 * Method to execute when user clicks on creating a new pay exhele
		 */
		public function clickCreatePayExhele($payExhele)  {
			$GLOBALS['debug']->log("presentador exhele");
			$command = CommandFactory :: createCommandCreatePayExhele($payExhele['nameExhele'], 
			$payExhele['amountExhele'], $payExhele['numberExhele'], $payExhele['exheleDate']);
			$command -> execute();		
			$GLOBALS['debug']->log("presentador fin");
			return $command -> getResult();
		}
			
	}
?>